package com.cobo.common.core;

import lombok.Data;

import java.util.List;

@Data
public class Page<T>{

    private long totalSize;

    private List<T> data;

    public static <T> R<Page<T>> wrapper(long totalSize,List<T> items) {
        Page<T> page = new Page<T>();
        page.setData(items);
        page.setTotalSize(totalSize);
        return R.ok(page);
    }
}
